package com.common.pattern.pipeline.utils;

import com.common.pattern.pipeline.handler.ContextHandler;
import lombok.extern.slf4j.Slf4j;

/**
 * @title: ContextHandlerUtil
 * @Author xu-xiang
 * @Date: 2023/8/10 15:34
 * @description: 上下文处理器工具类
 */
@Slf4j
public class ContextHandlerUtil {

    public static void printHandlerMsg(ContextHandler<?> handler, boolean isPrintLog) {
        if (isPrintLog) {
            printHandlerMsg(handler);
        }
    }

    public static void printHandlerMsg(ContextHandler<?> handler) {
        log.warn("[{}]执行完成!", handler.getClass().getSimpleName());
    }
}
